@import "../../styles/index.scss";

.le-input-wrapper {
  display: flex;

  .le-input-container {
    position: relative;
    height: 100%;

    .le-input,
    .le-textarea {
      font-size: 14px;
      padding: 4px 11px;
      line-height: 20px;
      border-radius: 4px;
      border: 1px solid rgba(0, 0, 0, 0.15);
      transition: all 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
      color: rgba(0, 0, 0, 0.65);
			outline: none;
			display: flex;

      &:focus {
        border: 1px solid #5db2f7;
      }

      &:hover {
        border: 1px solid #5db2f7;
      }
    }

    .le-input-close {
      display: inline-flex;
      width: 14px;
      height: 14px;
      justify-content: center;
      align-items: center;
      position: absolute;
      right: 4px;
      top: 50%;
      transform: translateY(-50%);
      cursor: pointer;
    }
  }

  &.clearable {
    .le-input-container {
      .le-input {
        padding-right: 20px !important;
      }
    }
  }


  &.has-before-addon {
    .le-input-container {
      .le-input {
        border-top-left-radius: 0px;
        border-bottom-left-radius: 0px;
      }
    }
  }

  &.has-after-addon {
    .le-input-container {
      .le-input {
        border-top-right-radius: 0px;
        border-bottom-right-radius: 0px;
      }
    }
  }

  &.disabled {
    .le-input-container {
      .le-input {
        cursor: not-allowed;
        color: rgba(0, 0, 0, 0.25);
        border-color: #d9d9d9;
        background-color: #e6e6e6;
      }
    }
  }

  .before-addon {
    display: inline-flex;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-right: none;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    background-color: #fafafa;
    font-size: 14px;
    line-height: 20px;
    padding: 4px 10px;
    color: rgba(0, 0, 0, 0.65);
    justify-content: center;
    align-items: center;
  }

  .after-addon {
    display: inline-flex;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-left: none;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    background-color: #fafafa;
    font-size: 14px;
    line-height: 20px;
    padding: 4px 10px;
    color: rgba(0, 0, 0, 0.65);
    justify-content: center;
    align-items: center;
  }
}